package o;

import com.huawei.appgallery.foundation.account.bean.UserSession;
import com.huawei.appgallery.purchasehistory.api.bean.FamilyMemberResponseBean.FamilyMemberResponseInfo;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class csv {
    private static csv ˏ;
    private List<FamilyMemberResponseInfo> ˊ = new ArrayList();
    private boolean ˋ = false;
    private List<String> ˎ = new ArrayList();

    private csv() {
    }

    public static synchronized csv ˋ() {
        csv o_csv;
        synchronized (csv.class) {
            if (ˏ == null) {
                ˏ = new csv();
            }
            o_csv = ˏ;
        }
        return o_csv;
    }

    public List<FamilyMemberResponseInfo> ˊ() {
        return this.ˊ;
    }

    public void ॱ(List<FamilyMemberResponseInfo> list) {
        this.ˊ.clear();
        if (!CollectCheck.isEmpty((List) list)) {
            this.ˊ.addAll(list);
        }
    }

    public boolean ˎ() {
        if (CollectCheck.isEmpty(this.ˊ)) {
            return false;
        }
        String userId = UserSession.getInstance().getUserId();
        if (dof.ॱ(userId)) {
            return false;
        }
        for (FamilyMemberResponseInfo familyMemberResponseInfo : this.ˊ) {
            if (userId.equals(familyMemberResponseInfo.ˋ()) && familyMemberResponseInfo.ॱ() == 1) {
                return true;
            }
        }
        return false;
    }

    public boolean ॱ() {
        return this.ˋ;
    }

    public void ˏ(boolean z) {
        this.ˋ = z;
    }

    public List<FamilyMemberResponseInfo> ˏ() {
        if (CollectCheck.isEmpty(this.ˊ)) {
            return Collections.emptyList();
        }
        List<FamilyMemberResponseInfo> arrayList = new ArrayList();
        for (FamilyMemberResponseInfo familyMemberResponseInfo : this.ˊ) {
            if (!(dof.ˎ(familyMemberResponseInfo.ˋ(), UserSession.getInstance().getUserId()) || familyMemberResponseInfo.ॱ() == 0)) {
                arrayList.add(familyMemberResponseInfo);
            }
        }
        return arrayList;
    }

    public void ʽ() {
        if (!CollectCheck.isEmpty(this.ˊ)) {
            this.ˊ.clear();
        }
    }

    public void ˋ(String str) {
        this.ˎ.add(str);
    }

    public List<String> ʻ() {
        return this.ˎ;
    }
}
